﻿using System;
using System.Collections;
using System.Diagnostics;
using System.Xml.Serialization;

using Gonte.Reflection;

namespace Gonte.Xml.Serialization
{
    /// <summary>
    /// Deserializes an object that implements the IList interface
    /// </summary>
    public class XmlListDeserializer
        : XmlCollectionDeserializer
    {
        #region Constructors

        protected internal XmlListDeserializer(Object @object)
            : base(@object)
        {
        }

        #endregion

        #region Overridables

        protected override void OnDeserializedItem(Object item)
        {
            CollectionHelper.AddItemToList((IList)object_, item);
        }

        #endregion
    }
}
